<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <title>云米解冻申请</title>
    <link rel="stylesheet" type="text/css" href="/style/css/base.css"/>
    <link rel="stylesheet" type="text/css" href="/style/css/swiper.min.css"/>
    <link rel="stylesheet" type="text/css" href="/style/css/xshop.css?ver=20180728" />
    <script src="/style/js/jquery-1.12.0.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="/style/js/swiper.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="/style/js/xShop.js" type="text/javascript" charset="utf-8"></script>
    </head>
<body>
<div class="outwrap">
  <!--top-->
  <!-- <div class="topbar clearfix topvh">
    <a href="/myshop/my_bag" class="btn-back">
      <i class="ico-back"></i><span>提现申请</span>
    </a>
  </div> -->
  <form id="form_tx">
  <div class="meinner-adr-add">

    <div class="tixian-edu">
      <p class="kt"> 可解冻云米：<span><?=number_format($this->data['cloud_money'], 2, ".", "")?></span>元</p>
    </div>
    <div class="tixian-edu mt20">
       <p class="kt">达标挥拍次数：<span><?=$this->data['pat_num']?></span>次</p>
       <p class="kt">截止申请日已挥拍：<span><?=$this->data['my_pat_num']?></span>次</p>
    </div>

    <div class="tixian-edu mt20">
       <p class="sm">云米解冻说明：<br>
       1. 申请解冻云米数额：必须大于0元<br>
       2. 截止申请日已挥拍要大于达标挥拍次数 <br>
       3. 申请成功并管理员审核通过后，云米将注直接划到硒豆。
      </p>
    </div>

    <div class="btnwrap">
     <input type="hidden" value="uncloud" name="act">
      <input type="button" class="btn-mexl btn-bc"  id="submit_tx" value="申请" />
    </div>
  </div>
</form>
</div>
<link rel="stylesheet" href="/style/css/sweet-alert.css" />
<script type="text/javascript" src="/style/js/sweet-alert.min.js"></script>
<script type="text/javascript">
var _amount = <?=$this->data['cloud_money'] > 0 ? $this->data['cloud_money'] : 0?>;
var pat_num = <?=$this->data['pat_num'] > 0 ? $this->data['pat_num'] : 0?>;
var my_pat_num = <?=$this->data['my_pat_num'] > 0 ? $this->data['my_pat_num'] : 0?>;
$(document).ready(function(e) {

	  $("#submit_tx").click(function() { 
        if (_amount <=0) {
            swal("申请云米金额要大于0元");
            return false;
        }else if(my_pat_num <pat_num){
       	 swal("挥拍次数未达标");
         return false;
       
        }else {
           
            $.ajax({
                type: 'post',
                url: 'ajax',
                data: $("#form_tx").serialize() + "&mr=" + Math.random(),
                dataType: 'json',
                success: function(data) {
                    if (data != "") {
                        if (data.code == 200) {
                            swal(data.msg, '请等待我们为您处理', "success");
                            setTimeout(function(){
                              window.location.href = '/onermb/pat_coins';
                            },2000);
                        } else {
                            swal(data.msg);
                        }
                    }
                }
            });
        }
	 });
});
</script>

<!--底部导航-->

</body>
</html>
